import React from 'react';
import SyncScrollGanttChart from '../components/SyncScrollGanttChart';
import ErrorBoundary from '../components/ErrorBoundary';

const RoomManagement: React.FC = () => {
  const handleRoomSelect = (roomId: string, date: string) => {
    console.log('选择房间:', roomId, '日期:', date);
  };

  const handleNewOrder = (roomId: string, date: string) => {
    console.log('新建订单:', roomId, '日期:', date);
  };

  return (
    <div
      className='room-management-page'
      style={{
        width: '100vw',
        height: '100vh',
        margin: 0,
        padding: 0,
        overflow: 'hidden',
        display: 'flex',
        flexDirection: 'column',
      }}
    >
      <ErrorBoundary>
        <SyncScrollGanttChart
          onRoomSelect={handleRoomSelect}
          onNewOrder={handleNewOrder}
        />
      </ErrorBoundary>
    </div>
  );
};

export default RoomManagement;
